//单价，数量，钱数
var price = 25;
var count = 30;
var money = 800;
//计算总价
var total = price*count;
//判断总价是否大于等于500
//如果满足，在原来价格基础之上打8折，* 0.8
if(total>=500){
  //在原来的基础之上乘以0.8
  total = total*0.8;
}
//不管满足是否大于500，都需要输出总价
console.log('商品总价为:'+total+'元');
//找零一定得在总价出来以后
var rest = money - total;
console.log('应该找零为:'+rest+'元');










